Q: In which format does JavaScript support external JavaScript?
Solution: JavaScript supports external JavaScript, in the form of .js file. This extension can be captured by a number of applications including: Windows Script Host, Dreamweaver MX, Notepad, Netscape Navigator, PavScrip, UltraEdit. The files are generally text files.
Q: What are the two parts of JavaScript libraries?
Solution: All JavaScript libraries consists of two parts: The external JavaScript itself, which is simply a text file with the containing JavaScript code, saved as a .js file. A “script” tag referencing the external JavaScript file and defined on the page(s) that uses the library. TheQ: Which of the following attribute takes the source of the PHP file?A. imgB. srcC. sourceD. psrcSolution: Php file is used an scripting language for backend development. The syntax to referencing a PHP file using external JavaScript is consistent enough with what we already know:Q: What kind of path can the PHP file be?A. AbsoluteB. RelativeC. Either Absolute or RelativeD. Both Absolute and RelativeSolution: The PHP code is enclosed in special start and end processing instructions that allows you to jump into and out of “PHP mode”. The PHP file is either an absolute or relative path to a PHP script instead of the usual .js file.Q: Which of the following global variables is used to get parameters?A. $HTTP_GET_VAR[]B. $HTTP_GET_VARS()C. $HTTP_GET_VARSD. $HTTP_GET_VARS[]Solution: The global variable $HTTP_GET_VARS[] is used to get parameters. $HTTP_GET_VARS contains the same initial information, but is not a superglobal.Q: What is the purpose of the RegExp method test()?A. Tests for a match in its float parameterB. Tests for a match in its string parameterC. Tests for a match in its integer parameterD. Test for a match in nodeSolution: RegExp stands for regular expression which is an object that describes a pattern of characters.Q: What is the purpose of the function parameter filetype?A. File type to be expectedB. File type previously gotC. File type that should not be gotD. File type availableSolution: The File.type property is an inbuilt function of File WebAPI which gives the media type (MIME) of the file represented by a file object. The function parameter “filetype” lets you tell the script what file type to expect before loading.Q: Which of the following is the method used to add an element to the desired location?A. add.element()B. element.add()C. element.appendChild()D. addelement()Solution: The method element.appendChild() is used to add the element to the desired location within the document tree. The appendChild() method appends a node as the last child of a node.
You Have Score    | /10 |